//
//  ViewController.m
//  梁森直播
//
//  Created by 中创 on 2020/4/27.
//  Copyright © 2020 LS. All rights reserved.
//

#import "ViewController.h"

#import "LiveViewController.h"
#import "WatchViewController.h"

@interface ViewController ()


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor greenColor];
    
    [self setupUI];
}

- (void)setupUI{
    UIButton * liveBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [liveBtn setTitle:@"开直播" forState:UIControlStateNormal];
    liveBtn.frame = CGRectMake(20, 100, 80, 30);
    [liveBtn addTarget:self action:@selector(live) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:liveBtn];
    UIButton * seeLiveBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [seeLiveBtn setTitle:@"看直播" forState:UIControlStateNormal];
    seeLiveBtn.frame = CGRectMake(200, 100, 80, 30);
    [seeLiveBtn addTarget:self action:@selector(seeLive) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:seeLiveBtn];
}
- (void)live{
    LiveViewController * liveVC = [LiveViewController new];
    liveVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
    [self presentViewController:liveVC animated:YES completion:nil];
}
- (void)seeLive{
    WatchViewController * watchVC = [WatchViewController new];
    watchVC.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:watchVC animated:YES completion:nil];
}

@end
